﻿Public Class frmAD_LapPhieuThuTien_ChiTietPhieu
    Public _maSinhvien As Integer
    Public Property MaSinhvien() As Integer
        Get
            Return _maSinhvien
        End Get
        Set(ByVal value As Integer)
            _maSinhvien = value
        End Set
    End Property
    Public _maDangTin As Integer
    Public Property MaDangTin() As Integer
        Get
            Return _maDangTin
        End Get
        Set(ByVal value As Integer)
            _maDangTin = value
        End Set
    End Property
    Public _phieuDTO As New PhieuGioiThieuDTO
    Public _phieuBUS As New PhieuGioiThieuBUS

    Public dangtinDTO As New DangTinDTO
    Public dangtinBUS As New DangTinBUS
    Public svDTO As New SinhVienDTO
    Public svBUS As New SinhVienBUS
    Public diachiDTO As New DiaChiDTO
    Public diachiBUS As New DiaChiBUS
    Public loainhaDTO As New LoaiNhaDTO
    Public loainhaBUS As New LoaiNhaBUS

    Private Sub frmAD_LapPhieuThuTien_ChiTietPhieu_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load

        dangtinDTO.MaDangTin = MaDangTin
        dangtinDTO = dangtinBUS.SelectID(MaDangTin)
        svDTO.MaSinhVien = MaSinhvien
        diachiDTO.MaDiaChi = dangtinDTO.MaDiaChi
        diachiDTO = diachiBUS.SelectID(diachiDTO)
        svDTO = svBUS.GetItemMaSinhVien(svDTO.MaSinhVien)

        lbHoTen.Text = svDTO.HoTen
        lbEmail.Text = svDTO.Email
        lbSDT.Text = svDTO.DienThoai
        lbDiaChi.Text = diachiDTO.SoNha + ", " + diachiDTO.Duong + ", " + diachiDTO.Phuong + ", " + diachiDTO.Quan
        lbGiaThue.Text = dangtinDTO.GiaThue.ToString()
        lbLoaiNha.Text = loainhaBUS.SelectID(dangtinDTO.MaLoaiNha).TenLoaiNha
        lbDienTich.Text = dangtinDTO.DienTich.ToString()
        lbSucChua.Text = dangtinDTO.SucChua.ToString()
        lbPhiGioiThieu.Text = _phieuDTO.GiaTien.ToString()
        lbNgay.Text = _phieuDTO.NgayLap
    End Sub
End Class